﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace TestDataFileManipulator
{
    public partial class SingleColumnSeparatorUserControl : UserControl
    {
        public SingleColumnSeparatorUserControl()
        {
            InitializeComponent();
        }

        public string GetSeperator()
        {
            if (this.radioButtonTab.Checked == true)
                return "\t";
            if (this.radioButtonComma.Checked == true)
                return ",";
            if (this.radioButtonSemecolon.Checked == true)
                return ";";
            if (this.radioButtonSpace.Checked == true)
                return " ";
            if ((this.radioButtonOther.Checked == true) &&
                (string.IsNullOrEmpty(this.textBoxOther.Text) == false))
                return this.textBoxOther.Text;

            return null;
        }
    }
}
